const express = require('express');
const router = express.Router();
const favoriteController = require('../controllers/favoriteController');
const { authenticate } = require('../middleware/auth');

router.post('/', authenticate, favoriteController.addFavorite);
router.delete('/:product_id', authenticate, favoriteController.removeFavorite);
router.get('/', authenticate, favoriteController.getFavorites);
router.get('/check/:product_id', authenticate, favoriteController.checkFavorite);

module.exports = router;